A common type of network device is a network switch. A network switch forwards traffic or data units (e.g., cells or packets) from a source network component or components to a destination network component or components. Typically, network switch includes interfaces such as, for example, line cards, which are used to process network traffic and to pass selectively the traffic in and out of the switch. A line card is capable of supporting multiple high bandwidth channels or connections on bi-directional ports.
A common operation performed by a line card is accumulating and collecting statistics about a connection. Accumulating and collecting statistics about a connection has many useful applications. For example, if a connection is for a telephone call, determining the amount or types of cells or packets passing via the connection during a specific time period is important for billing purposes.
Thus, as traffic passes through a line card, statistics are counted and collected. Current line cards count statistics for each connection using counters. For example, a traffic cell passing through a line card may increment a traffic cell counter for a connection by one and the incremented count is stored in a memory.
Consequently, as line card speeds and number of connections per line cards increase, a limitation with current network interfaces is that a larger number of statistics have to be collected in shorter periods of time. A common method of collecting statistics for connections is polling for stored counted statistics in set time intervals for each connection regardless of the amount or type of traffic passing in each connection.
A disadvantage with the above polling method is data loss. That is, if a connection having high traffic must wait a certain time period before being polled, a counter for the high traffic connection may roll over thus providing unreliable and inaccurate statistical information. Furthermore, polling statistical information for a connection having a small amount or no traffic wastes processing time.
Therefore, avoiding data loss and reducing wasted processing time is critical in maintaining reliable and accurate statistical information for multiple connections supported by a network switch or interface.